#pragma once
#include "DataType.h"
#include <map>
#include <vector>
#include <string>
using namespace std;

//typedef map<std::string,CHqInfoSetting*> HqInfoMap;

class CIniData
{
public:
	CIniData(void);
	~CIniData(void);

public:
	//HqFileMap m_mapHqFileSetting;
	char host_ip[32];
	unsigned long host_port;

	char show2003_dir[256];
	char sjshq_dir[256];
	char hghq_dir[256];
	char gzlx_dir[256];
	char stbhq_dir[256];
	char sjsxx_dir[256];
	char hgxxn_dir[256];
	char cpxx_dir[256];
	char etf50_dir[256];
	char hqz_dir[256];

	char zhb_dir[256];
	char zhggqz_dir[256];
	char zhjbxx_dir[256];

	char htindex_dir[256];
	char htidx_con[256];

	char zxzs_dir[256];

	unsigned long start_time;
	unsigned long stop_time;
	long system_type;
	int luopan_flag;
	int weekendtest_flag;

	int show2003_flag;//
	int sjshq_flag;//
	int hghq_flag;
	int gzlx_flag;
	int stbhq_flag;
	int sjsxx_flag;
	int hgxxn_flag;
	int cpxx_flag;
	int etf50_flag;
	int hqz_flag;

	int zhb_flag;
	int zhggqz_flag;
	int zhjbxx_flag;

	int htindex_flag;
	int htidx_flag;

	int zxzs_flag;

	char show2003_ip[32];
	char sjshq_ip[32];
	char hghq_ip[32];
	char gzlx_ip[32];
	char stbhq_ip[32];
	char sjsxx_ip[32];
	char hgxxn_ip[32];
	char cpxx_ip[32];
	char etf50_ip[32];
	char hqz_ip[32];

	char zhb_ip[32];
	char zhggqz_ip[32];
	char zhjbxx_ip[32];

	char htindex_ip[32];
	char htidxcon_ip[32];

	char zxzs_ip[32];


	unsigned long show2003_port;
	unsigned long sjshq_port;
	unsigned long hghq_port;
	unsigned long gzlx_port;
	unsigned long stbhq_port;
	unsigned long sjsxx_port;
	unsigned long hgxxn_port;
	unsigned long cpxx_port;
	unsigned long etf50_port;
	unsigned long hqz_port;

	unsigned long zhb_port;
	unsigned long zhggqz_port;
	unsigned long zhjbxx_port;

	unsigned long htindex_port;
	unsigned long htidxcon_port;

	unsigned long zxzs_port;

	int m_intMaxShow2003Len;
	int m_intMaxSjshqLen;
	int m_intMaxHghqLen;
	int m_intMaxGzlxLen;
	int m_intMaxSjssbLen;

	int m_intMaxSjsxxLen;
	int m_intMaxHgxxnLen;
	int m_intMaxCpxxLen;
	int m_intMax50EtfLen;
	int m_intMaxHqzLen;

	int m_intMaxGtZhbLen;
	int m_intMaxGtZhggqzLen;
	int m_intMaxGtZhjbxxLen;

	int m_intMaxHtidxconLen;
	int m_intMaxHtindexLen;
	int m_intMaxZxzsLen;

	int m_intSleepMs;

	int m_system_type;
	int m_company_type;
	std::vector<HolidaysTime> m_vctHolidaysTime;

	static CRITICAL_SECTION   m_csLock;
public:
	void InitialData();
	static void InitialLock();
	bool save(const char* pFilename, const char* pNodeName);
	bool load(const char* pFilename, const char* pNodeName);
};
